package com.ctakit.sdk.app.base;

import android.app.Activity;
import android.os.Parcelable;
import android.support.annotation.IdRes;
import android.view.View;
import com.kaopiz.kprogresshud.KProgressHUD;

import java.io.Serializable;
import java.util.Map;

public interface MyActivity {
    Activity getActivity();

    void gotoActivity(Class clazz);

    int PERMISSIONS_REQUEST_CODE_FRAGMENT = 197;//申请权限的请求码

    int PERMISSIONS_REQUEST_CODE_ACTIVITY = 198; // 申请权限的请求码


    void gotoActivity(Class clazz, Map<String, Serializable> data);


    void gotoActivity(Class clazz, Map<String, Serializable> data, Map<String, Parcelable> parcelableMap);


    void gotoFragment(Class clazz);

    void gotoFragment(Class clazz, Map<String, Serializable> data);

    void gotoFragment(Class clazz, Map<String, Serializable> data, Map<String, Parcelable> parcelableMap);


    void showProgressDialog();

    KProgressHUD getProgressDialog();

    void showProgressDialog(String msg);

    void cancelProgressDialog();

    void showToastMsg(String msg);

    void alert(String msg);

    void finish();

    void initTitle(String title);

    <T extends View> T findView(@IdRes int id);

    boolean goBack(View v, boolean isPhoneBack);

    String getPageName();

    MyActivity getMyActivity();

}
